
package com.kugou.game.sdk.download;

import com.kugou.framework.db.BaseDbHelper;
import com.kugou.framework.download.DownloadTable;

import android.content.Context;
import android.database.sqlite.SQLiteDatabase;

/**
 * 描述:数据库创建类
 * 
 * @author chenys
 * @since 2013-12-30 下午12:35:46
 */
class SDKDbHelper extends BaseDbHelper {

    private final String DATABASE_NAME = "KugouPay.db";

    private final int DATABASE_VERSION = 1;

    private static SDKDbHelper mInstance;

    private SDKDbHelper(Context context) {
        super(context);
    }

    public static synchronized SDKDbHelper getInstance(Context context) {
        if (mInstance == null) {
            mInstance = new SDKDbHelper(context);
        }
        return mInstance;
    }

    @Override
    protected String getDatabaseName() {
        return DATABASE_NAME;
    }

    @Override
    protected int getDatabaseVersion() {
        return DATABASE_VERSION;
    }

    @Override
    protected void onDatabaseCreate(SQLiteDatabase db) {
        // 下载表
        db.execSQL(DownloadTable.CREATE_TABLE_SQL);
    }

    @Override
    protected void onDatabaseUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {

    }

}
